package com.yugao.fintech.framework.core.response.format;

import com.yugao.fintech.framework.assistant.core.exception.Assert;
import lombok.*;

@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ResponseCode {
    /**
     * 成功状态码
     */
    private Integer success = 200;
    /**
     * 失败状态码
     */
    private Integer fail = 500;

    public void check() {
        Assert.notNull(success, this.getClass().getName() + " success is null");
        Assert.notNull(fail, this.getClass().getName() + " fail is null");
    }
}
